package com.techshinogongjian.fp.func;

import com.techshinogongjian.fp.comm.MsgCallback;
import com.fingerUsb.FingerResult;
import com.techshinogongjian.fp.util.FpConst;

import android.os.Handler;

/**
 * 指纹接口
 * 
 * @author wangzhi
 */
public abstract class IFingerprintFunc {

	protected Handler mHandler;

	public abstract FingerResult tcGetDevFWInfo();

	public abstract int tcDevDetect(int nPort, String sPort);

	public abstract FingerResult tcGetDevSn();

	public abstract FingerResult tcGetImage(int nTimeout);

	public abstract int tcIsPressed(int nTimeout);

	public abstract FingerResult tcGetFeature(int nTimeout);

	public abstract FingerResult tcGetTemplate(int nTimeout);
	
	public abstract FingerResult tcSetSecurityLevel(int level);
	
	public abstract FingerResult tcEnroll(MsgCallback callback, int timeout);
	
	public abstract FingerResult tcSetEnrollImageCount(int newCount);
	
	public abstract FingerResult tcVerify(long fid,MsgCallback callback,int timeout);
	
	public abstract FingerResult tcSetTemplate(long fid,byte[] data);
	
	public abstract FingerResult tcBooTL();
	
	public FingerResult tcSetBaudRate(int baudRate){
		return new FingerResult(FpConst.TCY_NSUP);
	}
	
	public FingerResult tcMatch(byte[] feature,byte[] template,int security){
		return new FingerResult(FpConst.TCY_NSUP);
	}

	public abstract int tcCancel();

	public abstract boolean isConnected();

	public abstract FingerResult tcGetResult();

	public abstract boolean isCancel();
	
	public abstract boolean isBusy();

	public void setHandler(Handler handler) {
		mHandler = handler;
	}
}
